package cn.wen.core.utils;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

/**
 * Activity的跳转Util
 */

public class ActivityUtil {
    /**
     * 打开Activity
     */
    public static final void startActivity(Activity activity, Class<?> clazz) {
        startActivity(activity, clazz, null);
    }

    /**
     * 打开Activity
     */
    public static final void startActivity(Activity activity, Class<?> clazz, Bundle bundle) {
        if (activity == null) {
            return;
        }
        Intent intent = new Intent(activity, clazz);
        if (bundle != null) {
            intent.putExtras(bundle);
        }
        activity.startActivity(intent);
    }
}
